<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 1. 引入React相关的包 -->
    <!-- 提供React对象 -->
    <script src="../js/react.development.js"></script>
    <!-- 它依赖于React, 所以必须后引入 -->
    <script src="../js/react-dom.development.js"></script>
</head>

<body>
    <div id="root" class="aaa"></div>
    <script>
        const element = React.createElement(
        'div', 
        null,// 没有标签属性
        React.createElement('h2',{title:'武汉疫情'},'你关注的武汉疫情'),
        React.createElement('p',null,'已经稳定')
        )

        /* 4. 将React元素渲染到页面*/
        ReactDOM.render(element,document.getElementById('root'))

        /* 结论: 使用JS的代码创建虚拟DOM比较麻烦 */
    </script>
</body>

</html>